/**
 * 
 */
package com.base.myproject.client.ui;

import java.util.ArrayList;
import java.util.List;

import com.base.myproject.client.busi.BaseStore;
import com.base.myproject.client.busi.BO.BusiObject;
import com.base.myproject.client.jdbc.StoreInfo;
import com.extjs.gxt.ui.client.data.ModelType;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;

/**
 * @author zgw
 *2009-9-28 上午11:14:29
 * javazgw@gmail.com
 * 子表的界面主要是处理响应速度和用户界面简单化的。
 * 通常情况下用户在打开新单据的时候，有些单据的内容过多，很容易带来界面不友好的情况
 * 于是此类就是在用户需要才显示一个panel，数据的准备也是在显示的时候才装载的
 * 
 */
public class BaseChilePanel extends ContentPanel{

	protected StoreInfo storeinfo;
	protected ModelType type;
	protected BaseStore<BusiObject> store; 
	protected boolean isactive = false;
	protected List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
	
	public final static int NEW_MODE =1;
	public final static int QUERY_MODE=2;
	/**
	 * mode 1 新建状态，2 浏览状态
	 * @param mode
	 */
	public BaseChilePanel(ModelType type, StoreInfo storeinfo, List<ColumnConfig> columns,int mode)
	{
		setType(type);
		setStoreinfo(storeinfo);
		setColumns(columns);
		this.setVisible(false);
		if(mode==QUERY_MODE)
		{
		//	setIsactive(true);
			setActive();
		}
	}
	public BaseChilePanel()
	{
		
	}
	public void setActive()
	{
		
	
		
		
		
	}
	
	
	/**
	 * @return the columns
	 */
	public List<ColumnConfig> getColumns() {
		return columns;
	}
	/**
	 * @param columns the columns to set
	 */
	public void setColumns(List<ColumnConfig> columns) {
		this.columns = columns;
	}
	/**
	 * @return the info
	 */
	public StoreInfo getStoreinfo() {
		return storeinfo;
	}
	/**
	 * @param info the info to set
	 */
	public void setStoreinfo(StoreInfo info) {
		this.storeinfo = info;
	}
	/**
	 * @return the type
	 */
	public ModelType getType() {
		return type;
	}
	/**
	 * @param type the type to set
	 */
	public void setType(ModelType type) {
		this.type = type;
	}
	/**
	 * @return the store
	 */
	public BaseStore<BusiObject> getStore() {
		return store;
	}
	/**
	 * @param store the store to set
	 */
	public void setStore(BaseStore<BusiObject> store) {
		this.store = store;
	}
	/**
	 * @return the isactive
	 */
	public boolean isIsactive() {
		return isactive;
	}
	/**
	 * @param isactive the isactive to set
	 */
	public void setIsactive(boolean isactive) {
		this.isactive = isactive;
	}
	
}
